//
// Created by 郝羽 on 2018/2/3.
//

#include <iostream>
#include <list>
#include <string>

extern "C" {
#include <libavcodec/avcodec.h>
#include <libavformat/avformat.h>
}

#include "mixer.hpp"


int main(int argc, const char* argv[]) {

    av_register_all();
    avcodec_register_all();

    if (argc < 4) {
        std::clog << "mixer <input1> <input2> [<input3>...]" << std::endl;
        return -1;
    }

    std::list<std::string> input_file_names;
    for (int i = 1; i < argc; i++) {
        input_file_names.emplace_back(std::string(argv[i]));
    }
    Mixer m;
    m.Mix(input_file_names);
}